{include file="public/header" /}
    <style>
        body {
            background-color: #ffffff;
        }
    </style>
</head>
<body>

<div class="layui-tab">
    <ul class="layui-tab-title">
        <li >
            <a target="_self" class="current" href="/admin/setting/system">
                网站设置
            </a>
        </li>

        <li>
            <a target="_self" class="current" href="/admin/setting/upload">
                存储配置
            </a>
        </li>
        <li>
            <a target="_self" class="current" href="/admin/setting/sms">
                短信配置
            </a>
        </li>

        <li class="layui-this">
            <a target="_self" class="current" href="/admin/setting/service">
                客服信息
            </a>
        </li>
    </ul>
</div>

<form class="layui-form" action="">
    <div class="layui-form-item">
        <label class="layui-form-label">公司名称</label>
        <div class="layui-input-block">
            <input type="text" name="company_name"  placeholder="请输入公司名称" class="layui-input" value="{$_info.company_name}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">qq号</label>
        <div class="layui-input-block">
            <input type="text" name="company_qq"  placeholder="请输入qq号" class="layui-input" value="{$_info.company_qq}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">邮箱</label>
        <div class="layui-input-block">
            <input type="text" name="company_email"  placeholder="请输入邮箱" class="layui-input" value="{$_info.company_email}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">微信号</label>
        <div class="layui-input-block">
            <input type="text" name="company_weixin"  placeholder="请输入微信号" class="layui-input" value="{$_info.company_weixin}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">手机号</label>
        <div class="layui-input-block">
            <input type="text" name="company_phone"  placeholder="请输入手机号" class="layui-input" value="{$_info.company_phone}">
        </div>
    </div>


    <div class="layui-form-item">
        <div class="layui-input-block">
            <button type="submit" class="layui-btn" lay-submit lay-filter="saveBtn">立即提交</button>
        </div>
    </div>
</form>

</body>

{include file="public/footer" /}
<script>
    layui.use(['form'], function () {
        var form = layui.form,
            layer = layui.layer,
            $ = layui.$;

        //监听提交
        form.on('submit(saveBtn)', function (data) {
            $.ajax({
                url: "{:url('service')}",
                type: 'post',
                dataType: 'json',
                contentType: 'application/json',
                data: JSON.stringify(data.field),
                timeout: 2000,
                success: function (data1) {
                    if (data1.code == 0) {
                        layer.msg(data1.msg)
                        setTimeout(function () {
                            var iframeIndex = parent.layer.getFrameIndex(window.name);
                            parent.layer.close(iframeIndex);
                        }, 1000);
                    } else {
                        layer.msg(data1.msg)
                    }
                },
                error: function () {
                    layer.msg("添加失败")
                }
            })
            return false;
        });

    });
</script>

</html>